package com.inspur.cdc.server.license.core.sdk.dao;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * .
 * @author Smiley
 * 2018年1月5日
 *
 */
@Table(name = "t_ba_serial_number")
public class SerialNumberEntity {

    /** @Fields serialVersionUID: TODO 功能描述  */
    private static final long serialVersionUID = 1283051931004168761L;

    /**
     * id.
     */
    @Id
    private Long id;

    /**
     * 激活码
     */
    @Column(name = "active_code")
    private String activeCode;

    /**
     * 机器码
     */
    @Column(name = "mac_code")
    private String macCode;

    /**
     * 版本（0：试用    1标准    3企业）
     */
    @Column(name = "type")
    private String type;

    /**
     * 可用时间（试用版用到该值）
     */
    @Column(name = "available_time")
    private int availableTime;
    /**
     * 激活时间.
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 序列号.
     */
    @Column(name = "serial_number")
    private String serialNumber;

    /**
     *  延长次数
     * @return
     */
    @Column(name = "extent_frequency")
    private int extentFrequency = 0;

    /**
     * 客户名称
     */
    @Column(name = "customer_name")
    private String customerName;


    public int getResourceNumber() {
        return resourceNumber;
    }

    public void setResourceNumber(int resourceNumber) {
        this.resourceNumber = resourceNumber;
    }

    public String getSoftVersion() {
        return softVersion;
    }

    public void setSoftVersion(String softVersion) {
        this.softVersion = softVersion;
    }

    /**
     * 可添加资源数量
     */
    @Column(name = "resource_number")
    private int resourceNumber;

    /**
     * 软件版本
     */
    @Column(name = "soft_version")
    private String softVersion;

    


    public String getActiveCode() {
        return activeCode;
    }

    public void setActiveCode(String activeCode) {
        this.activeCode = activeCode;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public int getAvailableTime() {
        return availableTime;
    }

    public void setAvailableTime(int availableTime) {
        this.availableTime = availableTime;
    }

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取激活时间.
     *
     * @return create_time - 激活时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置激活时间.
     *
     * @param createTime 激活时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取序列号.
     *
     * @return serial_number - 序列号
     */
    public String getSerialNumber() {
        return serialNumber;
    }

    public String getMacCode() {
        return macCode;
    }

    public void setMacCode(String macCode) {
        this.macCode = macCode;
    }

    /**
     * 设置序列号.
     *
     * @param serialNumber 序列号
     */
    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber == null ? null : serialNumber.trim();
    }

    public int getExtentFrequency(){
        return this.extentFrequency;
    }

    public void setExtentFrequency(int extentFrequency) {
        this.extentFrequency = extentFrequency;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }
}
